import { reactive, ref } from "vue";

export default function InitHook() {
  const tableRef = ref<any>(null);
  const searchForm = reactive<ReceivableFee.SearchForm>({
    companyIdList: [],
    beforePageNum: 0,
    // state: undefined,
    waybillNums: "",
    customerNames: "",
    channelId: "",
    bizIdList: [],
    finIdList: [],
    followId: "",
    accountPeriodIdList: [],
    depositTime: [],
    customerIdList: [],
    companyNames: "",
    pageNum: 1,
    pageSize: 100,
    total: 0
  });
  const tableData = ref<Array<ReceivableFee.ListRows>>([]);
  const drawerOpts = reactive<Base.DrawerOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });
  const dialogOpts = reactive<Base.DialogOpts>({
    title: "",
    width: "520px",
    component: "",
    visible: false,
    type: 1,
    passData: {}
  });
  return {
    searchForm,
    tableData,
    drawerOpts,
    tableRef,
    dialogOpts
  };
}
